package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import flash.utils.ByteArray;
	import protobuf.E_PLAYER_STATE;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class TABLE_PLAYER_INFO extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const CHAIR_ID:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TABLE_PLAYER_INFO.chair_id", "chairId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var chairId:uint;

		/**
		 *  @private
		 */
		public static const PLAYER_NAME:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.TABLE_PLAYER_INFO.player_name", "playerName", (2 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var playerName:flash.utils.ByteArray;

		/**
		 *  @private
		 */
		public static const TOTAL_BET:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TABLE_PLAYER_INFO.total_bet", "totalBet", (3 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var total_bet$field:Number;

		private var hasField$0:uint = 0;

		public function clearTotalBet():void {
			hasField$0 &= 0xfffffffe;
			total_bet$field = new Number();
		}

		public function get hasTotalBet():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set totalBet(value:Number):void {
			hasField$0 |= 0x1;
			total_bet$field = value;
		}

		public function get totalBet():Number {
			return total_bet$field;
		}

		/**
		 *  @private
		 */
		public static const TILES:RepeatedFieldDescriptor$TYPE_UINT32 = new RepeatedFieldDescriptor$TYPE_UINT32("protobuf.TABLE_PLAYER_INFO.tiles", "tiles", (4 << 3) | com.netease.protobuf.WireType.VARINT);

		[ArrayElementType("uint")]
		public var tiles:Array = [];

		/**
		 *  @private
		 */
		public static const STATE:FieldDescriptor$TYPE_ENUM = new FieldDescriptor$TYPE_ENUM("protobuf.TABLE_PLAYER_INFO.state", "state", (5 << 3) | com.netease.protobuf.WireType.VARINT, protobuf.E_PLAYER_STATE);

		public var state:int;

		/**
		 *  @private
		 */
		public static const MONEY:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TABLE_PLAYER_INFO.money", "money", (6 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var money$field:Number;

		public function clearMoney():void {
			hasField$0 &= 0xfffffffd;
			money$field = new Number();
		}

		public function get hasMoney():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set money(value:Number):void {
			hasField$0 |= 0x2;
			money$field = value;
		}

		public function get money():Number {
			return money$field;
		}

		/**
		 *  @private
		 */
		public static const TILES_NUM:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TABLE_PLAYER_INFO.tiles_num", "tilesNum", (7 << 3) | com.netease.protobuf.WireType.VARINT);

		private var tiles_num$field:uint;

		public function clearTilesNum():void {
			hasField$0 &= 0xfffffffb;
			tiles_num$field = new uint();
		}

		public function get hasTilesNum():Boolean {
			return (hasField$0 & 0x4) != 0;
		}

		public function set tilesNum(value:uint):void {
			hasField$0 |= 0x4;
			tiles_num$field = value;
		}

		public function get tilesNum():uint {
			return tiles_num$field;
		}

		/**
		 *  @private
		 */
		public static const BET_NOW:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TABLE_PLAYER_INFO.bet_now", "betNow", (8 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var bet_now$field:Number;

		public function clearBetNow():void {
			hasField$0 &= 0xfffffff7;
			bet_now$field = new Number();
		}

		public function get hasBetNow():Boolean {
			return (hasField$0 & 0x8) != 0;
		}

		public function set betNow(value:Number):void {
			hasField$0 |= 0x8;
			bet_now$field = value;
		}

		public function get betNow():Number {
			return bet_now$field;
		}

		/**
		 *  @private
		 */
		public static const IS_SITOUT:FieldDescriptor$TYPE_BOOL = new FieldDescriptor$TYPE_BOOL("protobuf.TABLE_PLAYER_INFO.is_sitout", "isSitout", (9 << 3) | com.netease.protobuf.WireType.VARINT);

		private var is_sitout$field:Boolean;

		public function clearIsSitout():void {
			hasField$0 &= 0xffffffef;
			is_sitout$field = new Boolean();
		}

		public function get hasIsSitout():Boolean {
			return (hasField$0 & 0x10) != 0;
		}

		public function set isSitout(value:Boolean):void {
			hasField$0 |= 0x10;
			is_sitout$field = value;
		}

		public function get isSitout():Boolean {
			return is_sitout$field;
		}

		/**
		 *  @private
		 */
		public static const AVATAR_ID:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TABLE_PLAYER_INFO.avatar_id", "avatarId", (10 << 3) | com.netease.protobuf.WireType.VARINT);

		private var avatar_id$field:uint;

		public function clearAvatarId():void {
			hasField$0 &= 0xffffffdf;
			avatar_id$field = new uint();
		}

		public function get hasAvatarId():Boolean {
			return (hasField$0 & 0x20) != 0;
		}

		public function set avatarId(value:uint):void {
			hasField$0 |= 0x20;
			avatar_id$field = value;
		}

		public function get avatarId():uint {
			return avatar_id$field;
		}

		/**
		 *  @private
		 */
		public static const SEX:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TABLE_PLAYER_INFO.sex", "sex", (11 << 3) | com.netease.protobuf.WireType.VARINT);

		private var sex$field:uint;

		public function clearSex():void {
			hasField$0 &= 0xffffffbf;
			sex$field = new uint();
		}

		public function get hasSex():Boolean {
			return (hasField$0 & 0x40) != 0;
		}

		public function set sex(value:uint):void {
			hasField$0 |= 0x40;
			sex$field = value;
		}

		public function get sex():uint {
			return sex$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.chairId);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, this.playerName);
			if (hasTotalBet) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, total_bet$field);
			}
			for (var tiles$index:uint = 0; tiles$index < this.tiles.length; ++tiles$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.tiles[tiles$index]);
			}
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 5);
			com.netease.protobuf.WriteUtils.write$TYPE_ENUM(output, this.state);
			if (hasMoney) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 6);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, money$field);
			}
			if (hasTilesNum) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 7);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, tiles_num$field);
			}
			if (hasBetNow) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 8);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, bet_now$field);
			}
			if (hasIsSitout) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 9);
				com.netease.protobuf.WriteUtils.write$TYPE_BOOL(output, is_sitout$field);
			}
			if (hasAvatarId) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 10);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, avatar_id$field);
			}
			if (hasSex) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 11);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, sex$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var chair_id$count:uint = 0;
			var player_name$count:uint = 0;
			var total_bet$count:uint = 0;
			var state$count:uint = 0;
			var money$count:uint = 0;
			var tiles_num$count:uint = 0;
			var bet_now$count:uint = 0;
			var is_sitout$count:uint = 0;
			var avatar_id$count:uint = 0;
			var sex$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (chair_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.chairId cannot be set twice.');
					}
					++chair_id$count;
					this.chairId = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 2:
					if (player_name$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.playerName cannot be set twice.');
					}
					++player_name$count;
					this.playerName = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 3:
					if (total_bet$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.totalBet cannot be set twice.');
					}
					++total_bet$count;
					this.totalBet = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 4:
					if ((tag & 7) == com.netease.protobuf.WireType.LENGTH_DELIMITED) {
						com.netease.protobuf.ReadUtils.readPackedRepeated(input, com.netease.protobuf.ReadUtils.read$TYPE_UINT32, this.tiles);
						break;
					}
					this.tiles.push(com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input));
					break;
				case 5:
					if (state$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.state cannot be set twice.');
					}
					++state$count;
					this.state = com.netease.protobuf.ReadUtils.read$TYPE_ENUM(input);
					break;
				case 6:
					if (money$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.money cannot be set twice.');
					}
					++money$count;
					this.money = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 7:
					if (tiles_num$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.tilesNum cannot be set twice.');
					}
					++tiles_num$count;
					this.tilesNum = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 8:
					if (bet_now$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.betNow cannot be set twice.');
					}
					++bet_now$count;
					this.betNow = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 9:
					if (is_sitout$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.isSitout cannot be set twice.');
					}
					++is_sitout$count;
					this.isSitout = com.netease.protobuf.ReadUtils.read$TYPE_BOOL(input);
					break;
				case 10:
					if (avatar_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.avatarId cannot be set twice.');
					}
					++avatar_id$count;
					this.avatarId = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 11:
					if (sex$count != 0) {
						throw new flash.errors.IOError('Bad data format: TABLE_PLAYER_INFO.sex cannot be set twice.');
					}
					++sex$count;
					this.sex = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
